package com.jiinfo.vo;

import java.util.Random;

public class YzmVo {

	private static Random random=new Random();
	
	private String id;
	private long expires;
	private String yzm;
	private long createDate;
	private long sendTime;
	
	public YzmVo(String id,long expires){
		this.id=id;
		this.expires=expires;
		this.createDate=System.currentTimeMillis();
		this.yzm=(random.nextInt(899999)+100000)+"";
	}
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public long getExpires() {
		return expires;
	}
	public void setExpires(long expires) {
		this.expires = expires;
	}
	public String getYzm() {
		return yzm;
	}
	public void setYzm(String yzm) {
		this.yzm = yzm;
	}
	public long getCreateDate() {
		return createDate;
	}
	public void setCreateDate(long createDate) {
		this.createDate = createDate;
	}
	public long getSendTime() {
		return sendTime;
	}
	public void setSendTime(long sendTime) {
		this.sendTime = sendTime;
	}

	public boolean isValid(){
		if(expires>=System.currentTimeMillis()){
			return true;
		}
		return false;
	}
	
	public static void main(String[] args) {
		Random random=new Random();
		for (int i=0;i<10000;i++) {
			System.out.println(random.nextInt(899999)+100000);
		}
	}
}
